Objects Reference

static_mesh::ray_intersect

Prototype

mesh *ray_intersect(vector& ro,vector& rd,vector& ip,float& dist,int &facenum,float rad=0.0f);

Parameters

Parameter Type Description
ro vector& ray origin
rd vector& ray direction
ip vector& intersection point
dist float& intersection distance
facenum int& intersected face index into returned mesh
rad float collision radius

Return Value

Returns the mesh object if a collision is detected, NULL on no collision.

Remarks

This function implements the ray intersection virtual bsp_obect function for the bsp faces included in a leaf node.
It passes the ray_intersect call to the same function from its objmesh member variable.